#!/bin/bash 

CRYPTOGEN=cryptogen 
CONFIGTXGEN=configtxgen 

# if test -d crypto-config; then 
#     rm -rf crypto-config 
# fi 
# $CRYPTOGEN generate --config=./crypto.yaml

if test -d channel-config; then 
    rm -rf channel-config 
fi 
mkdir channel-config 


$CONFIGTXGEN --profile OrgsOrdererGenesis -outputBlock channel-config/genesis.block --channelID systemchain
$CONFIGTXGEN --profile OrgsChannel -outputCreateChannelTx channel-config/mychannel.tx --channelID mychannel
